<?php
abstract class mySkynBlock
{
	abstract function __construct();
	abstract public function component_1($content,$header);
	abstract public function component_2($content);
	public function generate_html_paginator(paginator $paginator_class , $nam_var_get,$createRaw_argument_1 = null ,
$createRaw_argument_2 = false)
	{
		$link = URL::rawSetArgument($nam_var_get,'__page__')->createRAW($createRaw_argument_1,$createRaw_argument_2);
		$link = explode('__page__',$link,2);
		$xhtml = new DOMDocument('1.0','UTF-8');
		$div = $xhtml->createElement('div');
		$xhtml->appendChild($div);
			$a = $xhtml->createElement('a');
			if($paginator_class->getCurrentPage() > 1)
			{
				$a->setAttribute('href', $link[0] . $paginator_class->getPreview() .$link[1]);
			}
			//$a->setAttribute('class',
			//	$paginator_class->getCurrentPage() < 2 ? 'mini_links_current': 'mini_links'
			//);
			$a->appendChild(new DOMElement('span','&laquo;Anterior ') );
		$div->appendChild($a);
		foreach($paginator_class->getPages() as $page)
		{
			$a = $xhtml->createElement('a');
			$a->setAttribute('href',$link[0]. $page .$link[1]);
			//$a->setAttribute('class',
				//$paginator_class->getCurrentPage() == $page ? 'mini_links_current': 'mini_links'
			//);

			$a->appendChild(new DOMElement('span',
				                $paginator_class->getCurrentPage() == $page ? " [$page] ":"-$page-"
							));
			$div->appendChild($a);
		}

		$a = $xhtml->createElement('a');
			if($paginator_class->getCurrentPage() < $paginator_class->totalPages())
			{
				$a->setAttribute('href', $link[0]. $paginator_class->getNext() .$link[1]);
			}
			$a->appendChild(new DOMElement('span',' Posterior&raquo;') );
		$div->appendChild($a);
		return $xhtml->saveHTML();
	}
}